package com.eascs.web.demo.url;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import com.eascs.site.controller.BaseRestController;
import com.eascs.site.view.BaseRestResult;
import com.eascs.site.view.MessageRestResult;

@Controller
public class RegularPathUrlController extends BaseRestController {
	@RequestMapping(value = "/demo-{id:[\\d]+}")
	public MessageRestResult regularExpression1(@PathVariable int id) {
		return BaseRestResult.info(String.valueOf(id));
	}

	@RequestMapping(value = "/demo/{id:[\\d]+}")
	public MessageRestResult regularExpression2(@PathVariable int id) {
		return BaseRestResult.info(String.valueOf(id));
	}
}
